<?php
/**
 * Created by PhpStorm.
 * User: fengliu
 * Date: 15/8/9
 * Time: 下午8:49
 */


if (isset($_POST['token']) &&$_POST['token'] === md5(hainuo)) {
    echo "<pre>";
    exec("cd ../ && pwd", $array1);
    $data = '当前目录是:<br />';
    $data .= var_export($array1, true);
    $data .= "<br />即将执行 git pull <br />";
    exec("git pull", $array2);
    $data .= var_export($array2, true);
    var_export($data);
} else {
    header("location:/xxxx/");
}
